package com.juc.phaser.phaser15;

import java.util.concurrent.Phaser;

public class Run3 {
    /**
     * 
     * java.lang.InterruptedException
	  at java.util.concurrent.Phaser.awaitAdvanceInterruptibly(Unknown Source)
	  at com.juc.phaser.phaser15.ThreadA.run(ThreadA.java:23)
	  
	   原因是提前将还未到达5秒的线程进行了中断
     */
	public static void main(String[] args) throws InterruptedException {
		Phaser phaser = new Phaser(3);
		ThreadA a = new ThreadA(phaser);
		a.setName("A");
		a.start();
		Thread.sleep(1000);
		a.interrupt();
	}
}
